//展示cell内容动画
function showNumberWithAnimation(i, j, num) {
	var numberCell = $("#number-cell-" + i + "-" + j);
	var cellImg = $("#cell-img-" + i + "-" + j);

	numberCell.css("background-color", getNumberBackgroundColor(num));
	numberCell.css("color", getNumberColor(num));
	
	if(getNumberText(num).substring(0, 3) == "img") {
		$(cellImg).attr("src", getNumberText(num));
	}else{
		numberCell.text(getNumberText(num));
	}

	if(textIsAStr(getNumberText(num))) {
		numberCell.css("font-size", "22px");
	}

	numberCell.animate({
		"width": "100px",
		"height": "100px",
		"top": getPostionTop(i, j),
		"left": getPostionLeft(i, j)
	}, 50);

	cellImg.animate({
		"width": "100px",
		"height": "100px",
		"top": getPostionTop(i, j),
		"left": getPostionLeft(i, j)
	}, 50);
}
//展示移动动画
function showMoveAnimation(fromX, fromY, toX, toY) {
	var numberCell = $("#number-cell-" + fromX + "-" + fromY);
	numberCell.animate({
		"top": getPostionTop(toX, toY),
		"left": getPostionLeft(toX, toY)
	}, 200);
}
//更新分数
function updateScore(score) {
	$("#score").text(score);
}

//显示成就的动画,提示
function showHonorAnimation(num) {
	$("#honor-" + num).animate({
		"opacity": "1",
		"background-color": "antiquewhite"
	}, 100);

	$("#honorAlert").animate({
		"opacity": "1"
	}, 800, function() {
		$("#honorAlert").animate({
			"opacity": "0"
		}, 500);
	});

	$("#alertImg").attr("src", "img/" + num + ".png")
}